# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.StorageTransfer.V1.Model.TransferSpec do
  @moduledoc """
  Configuration for running a transfer.

  ## Attributes

  *   `awsS3CompatibleDataSource` (*type:* `GoogleApi.StorageTransfer.V1.Model.AwsS3CompatibleData.t`, *default:* `nil`) - An AWS S3 compatible data source.
  *   `awsS3DataSource` (*type:* `GoogleApi.StorageTransfer.V1.Model.AwsS3Data.t`, *default:* `nil`) - An AWS S3 data source.
  *   `azureBlobStorageDataSource` (*type:* `GoogleApi.StorageTransfer.V1.Model.AzureBlobStorageData.t`, *default:* `nil`) - An Azure Blob Storage data source.
  *   `gcsDataSink` (*type:* `GoogleApi.StorageTransfer.V1.Model.GcsData.t`, *default:* `nil`) - A Cloud Storage data sink.
  *   `gcsDataSource` (*type:* `GoogleApi.StorageTransfer.V1.Model.GcsData.t`, *default:* `nil`) - A Cloud Storage data source.
  *   `gcsIntermediateDataLocation` (*type:* `GoogleApi.StorageTransfer.V1.Model.GcsData.t`, *default:* `nil`) - For transfers between file systems, specifies a Cloud Storage bucket to be used as an intermediate location through which to transfer data. See [Transfer data between file systems](https://cloud.google.com/storage-transfer/docs/file-to-file) for more information.
  *   `hdfsDataSource` (*type:* `GoogleApi.StorageTransfer.V1.Model.HdfsData.t`, *default:* `nil`) - An HDFS cluster data source.
  *   `httpDataSource` (*type:* `GoogleApi.StorageTransfer.V1.Model.HttpData.t`, *default:* `nil`) - An HTTP URL data source.
  *   `objectConditions` (*type:* `GoogleApi.StorageTransfer.V1.Model.ObjectConditions.t`, *default:* `nil`) - Only objects that satisfy these object conditions are included in the set of data source and data sink objects. Object conditions based on objects' "last modification time" do not exclude objects in a data sink.
  *   `posixDataSink` (*type:* `GoogleApi.StorageTransfer.V1.Model.PosixFilesystem.t`, *default:* `nil`) - A POSIX Filesystem data sink.
  *   `posixDataSource` (*type:* `GoogleApi.StorageTransfer.V1.Model.PosixFilesystem.t`, *default:* `nil`) - A POSIX Filesystem data source.
  *   `sinkAgentPoolName` (*type:* `String.t`, *default:* `nil`) - Specifies the agent pool name associated with the posix data sink. When unspecified, the default name is used.
  *   `sourceAgentPoolName` (*type:* `String.t`, *default:* `nil`) - Specifies the agent pool name associated with the posix data source. When unspecified, the default name is used.
  *   `transferManifest` (*type:* `GoogleApi.StorageTransfer.V1.Model.TransferManifest.t`, *default:* `nil`) - A manifest file provides a list of objects to be transferred from the data source. This field points to the location of the manifest file. Otherwise, the entire source bucket is used. ObjectConditions still apply.
  *   `transferOptions` (*type:* `GoogleApi.StorageTransfer.V1.Model.TransferOptions.t`, *default:* `nil`) - If the option delete_objects_unique_in_sink is `true` and time-based object conditions such as 'last modification time' are specified, the request fails with an INVALID_ARGUMENT error.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :awsS3CompatibleDataSource =>
            GoogleApi.StorageTransfer.V1.Model.AwsS3CompatibleData.t() | nil,
          :awsS3DataSource => GoogleApi.StorageTransfer.V1.Model.AwsS3Data.t() | nil,
          :azureBlobStorageDataSource =>
            GoogleApi.StorageTransfer.V1.Model.AzureBlobStorageData.t() | nil,
          :gcsDataSink => GoogleApi.StorageTransfer.V1.Model.GcsData.t() | nil,
          :gcsDataSource => GoogleApi.StorageTransfer.V1.Model.GcsData.t() | nil,
          :gcsIntermediateDataLocation => GoogleApi.StorageTransfer.V1.Model.GcsData.t() | nil,
          :hdfsDataSource => GoogleApi.StorageTransfer.V1.Model.HdfsData.t() | nil,
          :httpDataSource => GoogleApi.StorageTransfer.V1.Model.HttpData.t() | nil,
          :objectConditions => GoogleApi.StorageTransfer.V1.Model.ObjectConditions.t() | nil,
          :posixDataSink => GoogleApi.StorageTransfer.V1.Model.PosixFilesystem.t() | nil,
          :posixDataSource => GoogleApi.StorageTransfer.V1.Model.PosixFilesystem.t() | nil,
          :sinkAgentPoolName => String.t() | nil,
          :sourceAgentPoolName => String.t() | nil,
          :transferManifest => GoogleApi.StorageTransfer.V1.Model.TransferManifest.t() | nil,
          :transferOptions => GoogleApi.StorageTransfer.V1.Model.TransferOptions.t() | nil
        }

  field(:awsS3CompatibleDataSource, as: GoogleApi.StorageTransfer.V1.Model.AwsS3CompatibleData)
  field(:awsS3DataSource, as: GoogleApi.StorageTransfer.V1.Model.AwsS3Data)
  field(:azureBlobStorageDataSource, as: GoogleApi.StorageTransfer.V1.Model.AzureBlobStorageData)
  field(:gcsDataSink, as: GoogleApi.StorageTransfer.V1.Model.GcsData)
  field(:gcsDataSource, as: GoogleApi.StorageTransfer.V1.Model.GcsData)
  field(:gcsIntermediateDataLocation, as: GoogleApi.StorageTransfer.V1.Model.GcsData)
  field(:hdfsDataSource, as: GoogleApi.StorageTransfer.V1.Model.HdfsData)
  field(:httpDataSource, as: GoogleApi.StorageTransfer.V1.Model.HttpData)
  field(:objectConditions, as: GoogleApi.StorageTransfer.V1.Model.ObjectConditions)
  field(:posixDataSink, as: GoogleApi.StorageTransfer.V1.Model.PosixFilesystem)
  field(:posixDataSource, as: GoogleApi.StorageTransfer.V1.Model.PosixFilesystem)
  field(:sinkAgentPoolName)
  field(:sourceAgentPoolName)
  field(:transferManifest, as: GoogleApi.StorageTransfer.V1.Model.TransferManifest)
  field(:transferOptions, as: GoogleApi.StorageTransfer.V1.Model.TransferOptions)
end

defimpl Poison.Decoder, for: GoogleApi.StorageTransfer.V1.Model.TransferSpec do
  def decode(value, options) do
    GoogleApi.StorageTransfer.V1.Model.TransferSpec.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.StorageTransfer.V1.Model.TransferSpec do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
